import request from "@/utils/request";

enum Api {
  getArtistSongUrl = "/artists",
  getArtistInfoUrl = "/artist/detail",
  getArtistAlbumUrl = "/artist/album",
  getArtistMVUrl = "/artist/mv",
}

/**
 * @description:获取歌手详情
 * @param {number} id
 * @return {*}
 */
export const getArtistInfoApi = (id: number) => {
  return request.get<any, any>(Api.getArtistInfoUrl, {
    params: {
      id,
    },
  });
};

/**
 * @description:获取歌手单曲
 * @param {number} id
 * @return {*}
 */
export const getArtistSongApi = (id: number) => {
  return request.get<any, any>(Api.getArtistSongUrl, {
    params: {
      id,
    },
  });
};

/**
 * @description:获取歌手专辑
 * @param {number} id
 * @return {*}
 */
export const getArtistAlbumApi = (id: number) => {
  return request.get<any, any>(Api.getArtistAlbumUrl, {
    params: {
      id,
    },
  });
};

/**
 * @description:获取歌手MV
 * @param {number} id
 * @return {*}
 */
export const getArtistMVApi = (id: number) => {
  return request.get<any, any>(Api.getArtistMVUrl, {
    params: {
      id,
    },
  });
};
